home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Misc / emu / p-interp.lha / p-interp-0.5 / psystem.h‾ < prev    next >
Text File  |  2001-05-20  |  4KB  |  125 lines

  1. /*
  2.  
  3.   P-Code interpreter (to run the apple pascal system)
  4.   Copyright (C) 2000 Mario Klebsch
  5.  
  6.   This program is free software; you can redistribute it and/or modify
  7.   it under the terms of the GNU General Public License as published by
  8.   the Free Software Foundation; either version 2 of the License, or
  9.   (at your option) any later version.
  10.  
  11.   This program is distributed in the hope that it will be useful,
  12.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.   GNU General Public License for more details.
  15.  
  16.   You should have received a copy of the GNU General Public License
  17.   along with this program; if not, write to the Free Software
  18.   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19.  
  20.  
  21.   $Log: psystem.h,v $
  22.   Revision 1.3  2001/05/20 20:29:02  mario
  23.   Doppelter Prototyp gelöscht
  24.  
  25.   Revision 1.2  2001/05/20 13:12:02  mario
  26.   CVS-Idents und Logs eingefügt
  27.  
  28.  
  29. */
  30.  
  31. typedef unsigned char    byte;
  32. typedef unsigned short    word;
  33. typedef signed short    Integer;
  34.  
  35. #define NUMBER(a) (sizeof(a)/sizeof(a[0]))
  36.  
  37. word Pop(void);
  38. void Push(word Value);
  39. void XeqError(word err);
  40.  
  41. void ProcessNative(word JTab);
  42.  
  43. void IoError    (word Result);
  44. void UnitRead    (word Unit, word Addr, Integer AddrOffset,
  45.          word Len, word Block, word Mode);
  46. void UnitWrite    (word Unit, word Addr, Integer AddrOffset,
  47.          word Len, word Block, word Mode);
  48. void UnitClear    (word Unit);
  49. void UnitStat    (word Unit, word Addr, Integer AddrOffset, word Dummy);
  50. word UnitBusy    (word Unit);
  51. void UnitWait    (word Unit);
  52.  
  53. void panic(char *Msg, ...);
  54. void warning(char *Msg, ...);
  55. void XeqError(word err);
  56.  
  57. void CspIdSearch(word BufPtr, word Arg2Ptr);
  58. word CspTreeSearch(word TokenBuf, word ResultPtr, word NodePtr);
  59.  
  60. extern word Syscom;
  61.  
  62. #define SYSCOM_SIZE    170
  63. #define IORSLT        WordIndexed(Syscom,0)
  64. #define XEQERR        WordIndexed(Syscom,1)
  65. #define SYSUNIT        WordIndexed(Syscom,2)
  66. #define BUGSTATE    WordIndexed(Syscom,3)
  67. #define GDIRP        WordIndexed(Syscom,4)
  68. #define BOMBP        WordIndexed(Syscom,5)
  69. #define STKBASE        WordIndexed(Syscom,6)
  70. #define LASTMP        WordIndexed(Syscom,7)
  71. #ifdef APPLE_1_3
  72. #define BOMBPROC    WordIndexed(Syscom,8)
  73. #define BOMBSEG        WordIndexed(Syscom,9)
  74. #else
  75. #define JTAB        WordIndexed(Syscom,8)
  76. #define SEG        WordIndexed(Syscom,9)
  77. #endif
  78. #define MEMTOP        WordIndexed(Syscom,10)
  79. #define BOMBIPC        WordIndexed(Syscom,11)
  80.  
  81. #ifdef UCSD_I_3
  82. #define EXTENSION0    WordIndexed(Syscom,12)
  83. #define EXTENSION1    WordIndexed(Syscom,13)
  84. #define EXTENSION2    WordIndexed(Syscom,14)
  85. #define EXTENSION3    WordIndexed(Syscom,15)
  86. #define EXTENSION4    WordIndexed(Syscom,16)
  87. #define EXTENSION5    WordIndexed(Syscom,17)
  88. #define EXTENSION6    WordIndexed(Syscom,18)
  89. #define EXTENSION7    WordIndexed(Syscom,19)
  90. #define EXTENSION8    WordIndexed(Syscom,20)
  91. #define EXTENSION9    WordIndexed(Syscom,21)
  92. #define EXTENSION10    WordIndexed(Syscom,22)
  93. #define EXTENSION11    WordIndexed(Syscom,23)
  94. #define EXTENSION12    WordIndexed(Syscom,24)
  95. #define EXTENSION13    WordIndexed(Syscom,25)
  96. #define EXTENSION14    WordIndexed(Syscom,26)
  97. #else
  98. #define HLTLINE        WordIndexed(Syscom,12)
  99. #define BRKPTS0        WordIndexed(Syscom,13)
  100. #define BRKPTS1        WordIndexed(Syscom,14)
  101. #define BRKPTS2        WordIndexed(Syscom,15)
  102. #define BRKPTS3        WordIndexed(Syscom,16)
  103. #define RETRIES        WordIndexed(Syscom,17)
  104. #define EXTENSION0    WordIndexed(Syscom,18)
  105. #define EXTENSION1    WordIndexed(Syscom,19)
  106. #define EXTENSION2    WordIndexed(Syscom,20)
  107. #define EXTENSION3    WordIndexed(Syscom,21)
  108. #define EXTENSION4    WordIndexed(Syscom,22)
  109. #define EXTENSION5    WordIndexed(Syscom,23)
  110. #define EXTENSION6    WordIndexed(Syscom,24)
  111. #define EXTENSION7    WordIndexed(Syscom,25)
  112. #define EXTENSION8    WordIndexed(Syscom,26)
  113. #endif
  114. #define LOWTIME        WordIndexed(Syscom,27)
  115. #define HIGHTIME    WordIndexed(Syscom,28)
  116. #define MISCINFO    WordIndexed(Syscom,29)
  117. #define CRTTYPE        WordIndexed(Syscom,30)
  118. #define XRTCTRL        WordIndexed(Syscom,31)
  119. #define CRTINFO        WordIndexed(Syscom,37)
  120.  
  121. #define SEG_ENTRY_LEN    3
  122. #define SEG_UNIT(s)    WordIndexed(Syscom, 48 + SEG_ENTRY_LEN*(s))
  123. #define SEG_BLOCK(s)    WordIndexed(SEG_UNIT(s),1)
  124. #define SEG_SIZE(s)    WordIndexed(SEG_UNIT(s),2)
  125.